package models

type AdminSession struct {
	Id         uint
	UserId     int
	Token      string
	UpdateTime int
	ExpireTime int
}

// 指定表名
func (AdminSession) TableName() string {
	return "admin_session" // 替换为你想要的表名
}

// 用token查询一条记录
func (adminSession *AdminSession) FindByToken(Token string) *AdminSession {
	orm.Where(&AdminSession{Token: Token}).First(adminSession)
	return adminSession
}